Make GtkRecentChooser use GtkStyleContext
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 4 Jan 2011 01:11:12 +0000 (02:11 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 4 Jan 2011 02:06:14 +0000 (03:06 +0100)
gtk/gtkrecentchooserdefault.c

index 8fba86615d36045777280d20889101557d2bbb7a..84fe19928331e850dfba70e0e4fe0bff0e8a083f 100644 (file)
@@ -936,11 +936,15 @@ set_default_size (GtkRecentChooserDefault *impl)
   gint monitor_num;
   GtkRequisition req;
   GdkRectangle monitor;
+  GtkStyleContext *context;
+  GtkStateFlags state;
 
   widget = GTK_WIDGET (impl);
+  context = gtk_widget_get_style_context (widget);
+  state = gtk_widget_get_state_flags (widget);
 
   /* Size based on characters and the icon size */
-  font_size = pango_font_description_get_size (gtk_widget_get_style (widget)->font_desc);
+  font_size = pango_font_description_get_size (gtk_style_context_get_font (context, state));
   font_size = PANGO_PIXELS (font_size);
 
   width = impl->icon_size + font_size * NUM_CHARS;